package interaction.input;

import interaction.sampling.Sample;
import processing.core.PGraphics;
import processing.core.PVector;

public abstract class AbstractComponentDecorator implements Component {
	
	public abstract Component getInnerObject();
	
	public PVector getPosition() {
		return getInnerObject().getPosition();
	}

	
	public PVector getSize() {
		return getInnerObject().getSize();
	}

	
	public boolean hasFocus() {
		return getInnerObject().hasFocus();
	}

	
	public boolean isHovered() {
		return getInnerObject().isHovered();
	}

	
	public boolean isOnTop(float mouseX, float mouseY) {
		return getInnerObject().isOnTop(mouseX, mouseY);
	}

	
	public Component setFocus(boolean hasFocus) {
		getInnerObject().setFocus(hasFocus);
		return this;
	}

	
	public void draw(PGraphics g) {
		getInnerObject().draw(g);
	}

	
	public boolean isEnabled() {
		return getInnerObject().isEnabled();
	}

	
	public void setEnabled(boolean status) {
		getInnerObject().setEnabled(status);
	}

	
	public void keyPressed(char c) {
		getInnerObject().keyPressed(c);
	}

	
	public void mouseMoved(PVector p) {
		getInnerObject().mouseMoved(p);
	}

	
	public void mousePressed(PVector p) {
		getInnerObject().mousePressed(p);
	}

	
	public void beatReceived(Sample s) {
		getInnerObject().beatReceived(s);
	}
}
